<?php
class Order extends AppModel {

	var $name = 'Order';


 var $validate = array(
		'job_number' => VALID_NOT_EMPTY,
		
	);


	//The Associations below have been created with all possible keys, those that are not needed can be removed
	var $belongsTo = array(
			'Driver' => array('className' => 'Driver',
								'foreignKey' => 'driver_id',
								'conditions' => '',
								'fields' => '',
								'order' => '',
								'counterCache' => ''),
			'Device' => array('className' => 'Device',
								'foreignKey' => 'device_id',
								'conditions' => '',
								'fields' => '',
								'order' => '',
								'counterCache' => ''),
			'Technical' => array('className' => 'Technical',
								'foreignKey' => 'technical_id',
								'conditions' => '',
								'fields' => '',
								'order' => '',
								'counterCache' => ''),
			'School' => array('className' => 'School',
								'foreignKey' => 'school_id',
								'conditions' => '',
								'fields' => '',
								'order' => '',
								'counterCache' => ''),
			'Result' => array('className' => 'Result',
								'foreignKey' => 'result_id',
								'conditions' => '',
								'fields' => '',
								'order' => '',
								'counterCache' => ''),



	);

	

	var $hasAndBelongsToMany = array(
			'Part' => array('className' => 'Part',
						'joinTable' => 'orders_parts',
						'foreignKey' => 'order_id',
						'associationForeignKey' => 'part_id',
						'conditions' => '',
						'fields' => '',
						'order' => '',
						'limit' => '',
						'offset' => '',
						'unique' => '',
						'finderQuery' => '',
						'deleteQuery' => '',
						'insertQuery' => ''),
	);

}
?>
